<?php
/*
  $Id:$
 */
  require('include/application_top.php');

  if ((isset($_POST['password']) && $_POST['password'] == PASSWORD) || (isset($_SESSION['isLogined']) && $_SESSION['isLogined'] === true)) {
    $_SESSION['isLogined'] = true;
    if (isset($_SESSION['loginUrl'])) {
      $url = $_SESSION['loginUrl'];
      unset($_SESSION['loginUrl']);
    } else {
      $url = './page.php';
    }
    redirect($url);
    exit;
  } 

?>
<html> 
<head> 
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  <title>登录</title> 
</head> 
<body>
<form action="" method="post">
  <input type="password" name="password" /> <input type="submit" value="登录" />
</form>
</body>
</html>